<template>
  <div>
    <a-button type="primary" @click="showDrawer">
      点击查看项目详情
    </a-button>
    <a-drawer
      title="项目详情"
      placement="left"
      :closable="true"
      :visible="visible"
      :width="320"
      :after-visible-change="afterVisibleChange"
      @close="onClose"
    >
      <a-form-item label="">
        <span>项目名 ：</span>
        <a-input v-model="projectName" :disabled="true"></a-input>
      </a-form-item>

      <a-form-item label="">
        <span>项目类型 ：</span>
      <a-input v-model="projectType" :disabled="true"></a-input>
      </a-form-item>

      <a-form-item label="">
        <span>项目开始时间 ：</span>
      <a-input v-model="professorWorkBeginTime" :disabled="true"></a-input>
      </a-form-item>

      <a-form-item label="">
        <span>项目开始地址 ：</span>
      <a-input v-model="professorWorkAddress" :disabled="true"></a-input>
      </a-form-item>

      <a-form-item label="">
        <span>项目来源 ：</span>
      <a-input v-model="projectFrom" :disabled="true"></a-input>
      </a-form-item>

      <a-form-item label="">
        <span>项目金额 ：</span>
      <a-input v-model="projectAmount" :disabled="true"></a-input>
      </a-form-item>

      <a-button @click="uploadFile(projectFile)"> 点击下载项目附件</a-button>

    </a-drawer>
  </div>
</template>

<script>
  import {mixinDevice} from '@/utils/mixin'
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
    export default {
        name: "ProfessorProject",
      mixins: [JeecgListMixin, mixinDevice],
      data() {
        return {
          visible: false,
          projectName:this.item.projectName,
          projectType:this.item.projectType,
          professorWorkBeginTime:this.item.professorWorkBeginTime,
          professorWorkAddress:this.item.professorWorkAddress,
          projectFrom:this.item.projectFrom,
          projectAmount:this.item.projectAmount,
          projectFile:this.item.projectFile,
        };
      },
      props:['item'],
      methods: {
        afterVisibleChange(val) {
          console.log('visible', val);
        },
        showDrawer() {
          this.visible = true;
        },
        onClose() {
          this.visible = false;
        },
      },
    };
</script>

<style scoped>

</style>